# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-pytest
pkgver=6.0.1
pkgrel=1
pkgdesc="Python3 testing library"
url="https://docs.pytest.org/en/latest/"
arch="noarch"
license="MIT"
depends="py3-atomicwrites py3-attrs py3-more-itertools py3-iniconfig py3-pluggy py3-py py3-six py3-wcwidth
	py3-setuptools py3-packaging py3-toml"
source="https://files.pythonhosted.org/packages/source/p/pytest/pytest-$pkgver.tar.gz"
builddir="$srcdir/pytest-$pkgver"

replaces="pytest" # Backwards compatibility
provides="pytest=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 setup.py check
}

package() {
	mkdir -p "$pkgdir"/usr/bin

	local name; for name in py.test pytest; do
		ln -s $name-3 "$pkgdir"/usr/bin/$name
	done

	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="bdd790c3860da2ed3a3ff47f04512c3bfae4fa1e31fc6b96fc19bd57d1804a6fec968ecf17a11c5b20d30dcf82d6391ef0d893ae57a3da9ad777a15c078c129f  pytest-6.0.1.tar.gz"
